﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.ywxt.ProjectArchiving
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    using DB_NH.DB_Model.ywxt.ProjectArchiving;

    /// <summary>
    /// 项目归档附件记录
    /// </summary>
    public class ProjectArchivingAttachment_Map : EntityMapping<ProjectArchivingAttachment>
    {
        public ProjectArchivingAttachment_Map()
        {
            //所属项目
            ManyToOne(x => x.Project, map =>
            {
                map.Column("ProjectId");
                map.NotNullable(false);
            });

            Property(x => x.AttachmentType, map =>
            {
                map.Length(100);
            });

            //项目附件
            ManyToOne(x => x.Attachment, map =>
            {
                map.Column("AttachmentId");
                map.NotNullable(false);
            });

            Property(x => x.archivingid, map =>
            {
                map.Length(40);
            });
        }
    }
}
